#!/bin/bash
# common
export USER="xwx1135370"
export LLVM_PROJECT_DIR="/home/xwx1135370/workspace/Testing/llvm/toolchain/llvm-project"
export LLDB_PROJECT_DIR="/home/xwx1135370/workspace/Testing/llvm/toolchain/llvm-project/lldb"
export TOOLCHAIN_PATH="/home/xwx1135370/workspace/Testing/llvm/out"
export LD_LIBRARY_PATH="${TOOLCHAIN_PATH}/lib"
export SYSROOT="${TOOLCHAIN_PATH}/../sysroot"
export TOOLCHAIN_BIN_PATH="${TOOLCHAIN_PATH}/bin"
export LLDB_TEST_PATH="test/API"
export RUN_ENVIRONMENT="run_info.env"
export LLVM_CI_RESOURCES="/home/xwx1135370/workspace/Testing/llvm/llvm-ci/resources"
export LLVM_CI_CONFIGS="${LLVM_CI_RESOURCES}/config"
export LLVM_CI_SCRIPTS="${LLVM_CI_RESOURCES}/scripts"

# HOS平台
export DEVICE_SERIAL="$(adb get-serialno)"
export ANDROID_SERIAL="${DEVICE_SERIAL}"
export LLDB_SERVER_PORT=1234
export LLDB_API_REMOTE_PLATFORM_NAME_ANDROID="remote-android"
export LLDB_API_REMOTE_PLATFORM_URL_STRING="connect://:${LLDB_SERVER_PORT}"

# 半容器平台
#export DEVICE_SERIAL="$(adb get-serialno)"
#export ANDROID_SERIAL="${DEVICE_SERIAL}"
#export LLDB_SERVER_PORT=5050
#export LLDB_API_REMOTE_PLATFORM_NAME_ANDROID="remote-hos inner"
#export LLDB_API_REMOTE_PLATFORM_URL_STRING="connect://:${LLDB_SERVER_PORT}"


# OHOS平台
#export OHOS_DEVICE_SERIAL="$(hdc list targets)"
#export OHOS_SERIAL="${OHOS_DEVICE_SERIAL}"
#export LLDB_SERVER_PORT_OHOS=8080
#export LLDB_API_REMOTE_PLATFORM_NAME_OHOS="remote-ohos"
#export LLDB_API_REMOTE_PLATFORM_URL_STRING_OHOS="connect://:${LLDB_SERVER_PORT_OHOS}"


# aarch64-linux-ohos
#export TARGET="aarch64-linux-ohos"
#export CONFIG="aarch64-linux-ohos.cfg"
#export LLDB_API_DOTEST_ARCH="aarch64"
#export DISABLED_TESTS="lldb-api-aarch64-linux-ohos.txt"

# arm-linux-ohos
export TARGET="arm-linux-ohos"
export CONFIG="arm-linux-ohos.cfg"
export LLDB_API_DOTEST_ARCH="arm"
export DISABLED_TESTS="lldb-api-arm-linux-ohos.txt"

# arm-linux-hos
#export TARGET="arm-linux-hos"
#export CONFIG="linux-hos.cfg"
#export LLDB_API_DOTEST_ARCH="arm"
#export DISABLED_TESTS="lldb-api-arm-linux-hos.txt"

# aarch64-linux-hos
export TARGET="aarch64-linux-hos"
export CONFIG="linux-hos.cfg"
export LLDB_API_DOTEST_ARCH="aarch64"
export DISABLED_TESTS="lldb-api-aarch64-linux-hos.txt"

export EXCLUDE_FILE="${PWD}/${TARGET}-skip.txt"
export REMOTE_PLATFORM_WORKDIR="/data/local/tmp/lldb_api_test_${TARGET}"
export CONTAINER_REMOTE_PLATFORM_WORKDIR="/data/ohos_data/local/tmp/lldb_api_test_${TARGET}"
export LLDB_SERVER_BINARY_RELATIVE_TO_TOOLCHAIN_PATH="../lib/clang/12.0.1/bin/${TARGET}/lldb-server"
